From: Owen W. Taylor Date: Thu, 9 Oct 2014 16:05:11 +0000 (-0400) Subject: AuthPrompt: properly remove user widgets X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2029 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d8d046f2b3ed3d9ec3d46ac17cb185838dae8a28;p=gnome-shell.git AuthPrompt: properly remove user widgets When replacing a user widget, we need to destroy the child, not just unparent it, or it will leak. https://bugzilla.gnome.org/show_bug.cgi?id=738256 --- diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 4160a5668..3b435de30 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -419,11 +419,13 @@ const AuthPrompt = new Lang.Class({ }, setUser: function(user) { + let oldChild = this._userWell.get_child(); + if (oldChild) + oldChild.destroy(); + if (user) { let userWidget = new UserWidget.UserWidget(user); this._userWell.set_child(userWidget.actor); - } else { - this._userWell.set_child(null); } },